Integrand size = 27, antiderivative size = 161 \[ \int \frac {(e+f x) \text {sech}(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {(e+f x) \arctan \left (e^{c+d x}\right )}{a d}-\frac {i f \operatorname {PolyLog}\left (2,-i e^{c+d x}\right )}{2 a d^2}+\frac {i f \operatorname {PolyLog}\left (2,i e^{c+d x}\right )}{2 a d^2}+\frac {f \text {sech}(c+d x)}{2 a d^2}+\frac {i (e+f x) \text {sech}^2(c+d x)}{2 a d}-\frac {i f \tanh (c+d x)}{2 a d^2}+\frac {(e+f x) \text {sech}(c+d x) \tanh (c+d x)}{2 a d} \]
[Out]
Time = 0.10 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.296, Rules used = {5690, 4270, 4265, 2317, 2438, 5559, 3852, 8} \[ \int \frac {(e+f x) \text {sech}(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {(e+f x) \arctan \left (e^{c+d x}\right )}{a d}-\frac {i f \operatorname {PolyLog}\left (2,-i e^{c+d x}\right )}{2 a d^2}+\frac {i f \operatorname {PolyLog}\left (2,i e^{c+d x}\right )}{2 a d^2}-\frac {i f \tanh (c+d x)}{2 a d^2}+\frac {f \text {sech}(c+d x)}{2 a d^2}+\frac {i (e+f x) \text {sech}^2(c+d x)}{2 a d}+\frac {(e+f x) \tanh (c+d x) \text {sech}(c+d x)}{2 a d} \]
[In]
[Out]
Rule 8
Rule 2317
Rule 2438
Rule 3852
Rule 4265
Rule 4270
Rule 5559
Rule 5690
Rubi steps \begin{align*} \text {integral}& = -\frac {i \int (e+f x) \text {sech}^2(c+d x) \tanh (c+d x) \, dx}{a}+\frac {\int (e+f x) \text {sech}^3(c+d x) \, dx}{a} \\ & = \frac {f \text {sech}(c+d x)}{2 a d^2}+\frac {i (e+f x) \text {sech}^2(c+d x)}{2 a d}+\frac {(e+f x) \text {sech}(c+d x) \tanh (c+d x)}{2 a d}+\frac {\int (e+f x) \text {sech}(c+d x) \, dx}{2 a}-\frac {(i f) \int \text {sech}^2(c+d x) \, dx}{2 a d} \\ & = \frac {(e+f x) \arctan \left (e^{c+d x}\right )}{a d}+\frac {f \text {sech}(c+d x)}{2 a d^2}+\frac {i (e+f x) \text {sech}^2(c+d x)}{2 a d}+\frac {(e+f x) \text {sech}(c+d x) \tanh (c+d x)}{2 a d}+\frac {f \text {Subst}(\int 1 \, dx,x,-i \tanh (c+d x))}{2 a d^2}-\frac {(i f) \int \log \left (1-i e^{c+d x}\right ) \, dx}{2 a d}+\frac {(i f) \int \log \left (1+i e^{c+d x}\right ) \, dx}{2 a d} \\ & = \frac {(e+f x) \arctan \left (e^{c+d x}\right )}{a d}+\frac {f \text {sech}(c+d x)}{2 a d^2}+\frac {i (e+f x) \text {sech}^2(c+d x)}{2 a d}-\frac {i f \tanh (c+d x)}{2 a d^2}+\frac {(e+f x) \text {sech}(c+d x) \tanh (c+d x)}{2 a d}-\frac {(i f) \text {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{c+d x}\right )}{2 a d^2}+\frac {(i f) \text {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{c+d x}\right )}{2 a d^2} \\ & = \frac {(e+f x) \arctan \left (e^{c+d x}\right )}{a d}-\frac {i f \operatorname {PolyLog}\left (2,-i e^{c+d x}\right )}{2 a d^2}+\frac {i f \operatorname {PolyLog}\left (2,i e^{c+d x}\right )}{2 a d^2}+\frac {f \text {sech}(c+d x)}{2 a d^2}+\frac {i (e+f x) \text {sech}^2(c+d x)}{2 a d}-\frac {i f \tanh (c+d x)}{2 a d^2}+\frac {(e+f x) \text {sech}(c+d x) \tanh (c+d x)}{2 a d} \\ \end{align*}
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(400\) vs. \(2(161)=322\).
Time = 2.24 (sec) , antiderivative size = 400, normalized size of antiderivative = 2.48 \[ \int \frac {(e+f x) \text {sech}(c+d x)}{a+i a \sinh (c+d x)} \, dx=-\frac {-2 i d (e+f x)+(c+d x) (c f-d (2 e+f x)) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )^2+(1-i) \left (\frac {1}{2} d^2 f x^2+d e (c+d x)-(1-i) (d e-c f) (c+d x)+(1-i) f (c+d x) \log \left (1+i e^{-c-d x}\right )+(1-i) (d e-c f) \log \left (i+e^{c+d x}\right )-(1-i) f \operatorname {PolyLog}\left (2,-i e^{-c-d x}\right )\right ) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )^2+(1+i) \left (\frac {1}{2} d^2 f x^2+d e (c+d x)-(1+i) (d e-c f) (c+d x)+(1+i) f (c+d x) \log \left (1-i e^{-c-d x}\right )+(1+i) (d e-c f) \log \left (i-e^{c+d x}\right )-(1+i) f \operatorname {PolyLog}\left (2,i e^{-c-d x}\right )\right ) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )^2-4 f \sinh \left (\frac {1}{2} (c+d x)\right ) \left (-i \cosh \left (\frac {1}{2} (c+d x)\right )+\sinh \left (\frac {1}{2} (c+d x)\right )\right )}{4 d^2 (a+i a \sinh (c+d x))} \]
[In]
[Out]
Time = 5.38 (sec) , antiderivative size = 218, normalized size of antiderivative = 1.35
method | result | size |
risch | \(\frac {d f x \,{\mathrm e}^{d x +c}+d e \,{\mathrm e}^{d x +c}+f \,{\mathrm e}^{d x +c}-i f}{\left ({\mathrm e}^{d x +c}-i\right )^{2} d^{2} a}+\frac {e \arctan \left ({\mathrm e}^{d x +c}\right )}{d a}+\frac {i f \ln \left (1-i {\mathrm e}^{d x +c}\right ) x}{2 d a}+\frac {i f \ln \left (1-i {\mathrm e}^{d x +c}\right ) c}{2 d^{2} a}+\frac {i f \operatorname {polylog}\left (2, i {\mathrm e}^{d x +c}\right )}{2 a \,d^{2}}-\frac {i f \ln \left (1+i {\mathrm e}^{d x +c}\right ) x}{2 d a}-\frac {i f \ln \left (1+i {\mathrm e}^{d x +c}\right ) c}{2 d^{2} a}-\frac {i f \operatorname {polylog}\left (2, -i {\mathrm e}^{d x +c}\right )}{2 a \,d^{2}}-\frac {f c \arctan \left ({\mathrm e}^{d x +c}\right )}{d^{2} a}\) | \(218\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 352 vs. \(2 (135) = 270\).
Time = 0.25 (sec) , antiderivative size = 352, normalized size of antiderivative = 2.19 \[ \int \frac {(e+f x) \text {sech}(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {{\left (i \, f e^{\left (2 \, d x + 2 \, c\right )} + 2 \, f e^{\left (d x + c\right )} - i \, f\right )} {\rm Li}_2\left (i \, e^{\left (d x + c\right )}\right ) + {\left (-i \, f e^{\left (2 \, d x + 2 \, c\right )} - 2 \, f e^{\left (d x + c\right )} + i \, f\right )} {\rm Li}_2\left (-i \, e^{\left (d x + c\right )}\right ) + 2 \, {\left (d f x + d e + f\right )} e^{\left (d x + c\right )} + {\left (-i \, d e + i \, c f + {\left (i \, d e - i \, c f\right )} e^{\left (2 \, d x + 2 \, c\right )} + 2 \, {\left (d e - c f\right )} e^{\left (d x + c\right )}\right )} \log \left (e^{\left (d x + c\right )} + i\right ) + {\left (i \, d e - i \, c f + {\left (-i \, d e + i \, c f\right )} e^{\left (2 \, d x + 2 \, c\right )} - 2 \, {\left (d e - c f\right )} e^{\left (d x + c\right )}\right )} \log \left (e^{\left (d x + c\right )} - i\right ) + {\left (i \, d f x + i \, c f + {\left (-i \, d f x - i \, c f\right )} e^{\left (2 \, d x + 2 \, c\right )} - 2 \, {\left (d f x + c f\right )} e^{\left (d x + c\right )}\right )} \log \left (i \, e^{\left (d x + c\right )} + 1\right ) + {\left (-i \, d f x - i \, c f + {\left (i \, d f x + i \, c f\right )} e^{\left (2 \, d x + 2 \, c\right )} + 2 \, {\left (d f x + c f\right )} e^{\left (d x + c\right )}\right )} \log \left (-i \, e^{\left (d x + c\right )} + 1\right ) - 2 i \, f}{2 \, {\left (a d^{2} e^{\left (2 \, d x + 2 \, c\right )} - 2 i \, a d^{2} e^{\left (d x + c\right )} - a d^{2}\right )}} \]
[In]
[Out]
\[ \int \frac {(e+f x) \text {sech}(c+d x)}{a+i a \sinh (c+d x)} \, dx=- \frac {i \left (\int \frac {e \operatorname {sech}{\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx + \int \frac {f x \operatorname {sech}{\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx\right )}{a} \]
[In]
[Out]
\[ \int \frac {(e+f x) \text {sech}(c+d x)}{a+i a \sinh (c+d x)} \, dx=\int { \frac {{\left (f x + e\right )} \operatorname {sech}\left (d x + c\right )}{i \, a \sinh \left (d x + c\right ) + a} \,d x } \]
[In]
[Out]
\[ \int \frac {(e+f x) \text {sech}(c+d x)}{a+i a \sinh (c+d x)} \, dx=\int { \frac {{\left (f x + e\right )} \operatorname {sech}\left (d x + c\right )}{i \, a \sinh \left (d x + c\right ) + a} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(e+f x) \text {sech}(c+d x)}{a+i a \sinh (c+d x)} \, dx=\int \frac {e+f\,x}{\mathrm {cosh}\left (c+d\,x\right )\,\left (a+a\,\mathrm {sinh}\left (c+d\,x\right )\,1{}\mathrm {i}\right )} \,d x \]
[In]
[Out]